//
//  About.swift
//  jiweiapp
//
//  Created by Kin Wong on 15/8/23.
//  Copyright (c) 2015年 Kin Wong. All rights reserved.
//

import UIKit

class About: UIViewController {
    
    var versionLabel = UILabel()

    override func viewDidLoad() {
        super.viewDidLoad()
        
        var touch = UITapGestureRecognizer(target: self, action: "touchOnce")
        
        touch.numberOfTapsRequired = 1
        touch.numberOfTouchesRequired = 1
        self.view.addGestureRecognizer(touch)
        self.view.backgroundColor = UIColor(patternImage: UIImage(named: "about", inBundle: NSBundle(forClass: About.self), compatibleWithTraitCollection: nil)!)
        
        versionLabel.frame = CGRectMake(0, CGRectGetHeight(self.view.bounds)*(9/11), CGRectGetWidth(self.view.bounds), 50)
        versionLabel.text = "Version 1.0"
        versionLabel.textColor = UIColor.whiteColor()
        versionLabel.textAlignment = NSTextAlignment.Center
        self.view.addSubview(versionLabel)

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    func touchOnce() {
        self.dismissViewControllerAnimated(true, completion: nil)
    }
}
